﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SlimDX;
using SlimDX.Direct3D9;
namespace ThreeDI.UI.Abstraction
{
    public abstract class TransformObject
    {
        private Matrix _position = Matrix.Identity;

        Application _application;

        public TransformObject(Application application)
        {
            _application = application;
        }

        public void Translation(float x, float y, float z)
        {
          _position =  Matrix.Multiply(_position, Matrix.Translation(new Vector3(x, y, z)));

        }
        public void Rotation(float y, float x, float z)
        {
           _position = Matrix.Multiply(_position, Matrix.RotationYawPitchRoll(y, x, z));

        }
        public void Scaling(float x, float y, float z)
        {
            _position = Matrix.Multiply(_position, Matrix.Scaling(new Vector3(x, y, z)));

        }

        public Matrix TransformationMatrix
        {
            get
            {
                return _position;
            }
            set
            {
                _position = value;
            }
        }

        protected Application Application
        {
            get
            {
                return _application;
            }
        }

        public abstract void Load();
        public abstract void Render();
    }
}

